[appkit plugin] [6/x] Add bundled chat UI to @databricks/appkit-agent#391
Open
hubertzub-db wants to merge 14 commits intodatabricks:mainfrom
Open
[appkit plugin] [6/x] Add bundled chat UI to @databricks/appkit-agent#391hubertzub-db wants to merge 14 commits intodatabricks:mainfrom
hubertzub-db wants to merge 14 commits intodatabricks:mainfrom
Conversation
This was referenced Mar 24, 2026
23b1ea1 to
6e51f08
Compare
7788ee8 to
ab61bc9
Compare
ab61bc9 to
55a4366
Compare
0d14562 to
a312c62
Compare
3 tasks
bbqiu
approved these changes
Mar 31, 2026
| // Handle query param auto-send (for ?query=... deep-links) | ||
| let searchParams: URLSearchParams | undefined; | ||
| try { | ||
| [searchParams] = useSearchParams(); |
Collaborator
There was a problem hiding this comment.
nit: should we not be calling this hook from within this try/catch?
| @@ -0,0 +1,221 @@ | |||
| import type { LanguageModelUsage, UIMessageChunk } from 'ai'; | |||
Collaborator
There was a problem hiding this comment.
would it be possible to dedupe this file with chat.tsx?
| ], | ||
| "scripts": { | ||
| "build": "rm -rf dist && tsdown && tailwindcss -c tailwind.chat-ui.config.js -i src/chat-ui/simple/styles.css -o dist/chat-ui/styles.css --minify", | ||
| "build:client": "cd client && pnpm install --frozen-lockfile=false && pnpm exec vite build", |
Collaborator
There was a problem hiding this comment.
should this be frozen lockfile = true?
Comment on lines
+60
to
+66
| if (typeof window !== 'undefined') { | ||
| window.__CHAT_CONFIG__ = { apiBase, basePath }; | ||
| } | ||
|
|
||
| useEffect(() => { | ||
| window.__CHAT_CONFIG__ = { apiBase, basePath }; | ||
| }, [apiBase, basePath]); |
Collaborator
There was a problem hiding this comment.
nit: can we use useLayoutEffect instead?
| return dir; | ||
| } | ||
| } | ||
| return undefined; |
Collaborator
There was a problem hiding this comment.
nit: can we log an error explaining what's wrong and how the user might be able to resolve the error? ex. which command to run to generate these files
Move agent plugin source code into src/agent-plugin/ subfolder for better organization when hosting multiple plugins.
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Add per-package pnpm-lock.yaml and CI/release workflows with explicit pnpm version and cache-dependency-path.
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
Signed-off-by: Hubert Zub <hubert.zub@databricks.com>
a312c62 to
5d750d9
Compare
5d750d9 to
a1b28f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🥞 Stacked PR
Signed-off-by: Hubert Zub hubert.zub@databricks.com
Summary
Adds a pre-built React chat client to
@databricks/appkit-agent, bundled intodist/chat-client/duringpnpm run build. The UI is served as static assets via the chat plugin — not exported as importable React components.Important
This PR introduces UI pieces copied from e2e-chatbot-app-next that are used only for building a full bundle meant to be served by the appkit. Separate UI building blocks will be exported in latter PRs.
The client source is adapted from
databricks/app-templates/e2e-chatbot-app-next/client, moved intointegrations/appkit-agent/client/as a self-contained Vite + React app with its ownpackage.jsonandpnpm-lock.yaml.How it works
The chat plugin exposes
chat.staticAssetsPathwhich resolves to thedist/chat-client/directory containing the built SPA. Pass it to AppKit's server plugin to serve the UI:Full demo (running as appkit app)
Screen.Recording.2026-03-25.at.11.36.45.mov